package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018-3-1.
 */
@RestController
public class ConsumerController {
    @Autowired
    ProducerRemote producerRemote;

    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return producerRemote.helloWord(name);
    }
}
